import { Meta } from '@storybook/blocks';

import * as DecoratedBoxStories from '../stories/DecoratedBox.stories';

<Meta of={DecoratedBoxStories} />

# DecoratedBox

A widget that paints a Decoration either before or after its child paints.

## Example

```dart liveslice=DecoratedBox height=400px
DecoratedBox(
  position: DecorationPosition.background,
  decoration: BoxDecoration(
    color: const Color(0xFFFFFFFF),
    border: Border.all(
      color: const Color(0xFF000000),
      style: BorderStyle.solid,
      width: 4.0,
    ),
    borderRadius: BorderRadius.zero,
    shape: BoxShape.rectangle,
    boxShadow: const <BoxShadow>[
      BoxShadow(
        color: Color(0x66000000),
        blurRadius: 10.0,
        spreadRadius: 4.0,
      )
    ],
  ),
  child: Container(
    child: Container(
      width: 200,
      height: 200,
      padding: EdgeInsets.all(20),
      child: FlutterLogo(),
    ),
  ),
)
```

## Related Links

- https://api.flutter.dev/flutter/widgets/DecoratedBox-class.html
